﻿using System;

namespace YasharEl.Infrastructure.Diagnostics.Logging
{
    /// <summary>
    /// Common contract for trace instrumentation. You 
    /// can implement this contrat with several frameworks.
    /// .NET Diagnostics API, EntLib, Log4Net,NLog etc.
    /// <remarks>
    /// The use of this abstraction depends on the real needs you have and the specific features  
    /// you want to use of a particular existing implementation. 
    ///  You could also eliminate this abstraction and directly use "any" implementation in your code, 
    /// Logger.Write(new LogEntry()) in EntLib, or LogManager.GetLog("logger-name") with log4net... etc.
    /// </remarks>
    /// </summary>
    public interface ILogger
    {
        #region Info

        /// <summary>
        /// Log message information 
        /// </summary>
        /// <param name="message">The information message to write</param>
        /// <param name="args">The arguments values</param>
        void Info(string format, params object[] args);

        /// <summary>
        /// Log message information 
        /// </summary>
        /// <param name="message">The information message to write</param>
        /// <param name="args">The arguments values</param>
        void Info(Exception exception, string format, params object[] args);

        #endregion

        #region Warn

        void Warn(string format, params object[] args);
        void Warn(Exception exception, string format, params object[] args);

        #endregion

        #region Debug

        void Debug(string format, params object[] args);
        void Debug(Exception exception, string format, params object[] args);

        #endregion

        #region Error

        void Error(string format, params object[] args);
        void Error(Exception exception, string format, params object[] args);

        #endregion

        #region Fatal

        void Fatal(string format, params object[] args);
        void Fatal(Exception exception, string format, params object[] args);

        #endregion

        #region Properties

        bool IsDebugEnabled { get; }

        bool IsErrorEnabled { get; }

        bool IsFatalEnabled { get; }

        bool IsInfoEnabled { get; }

        bool IsWarnEnabled { get; }

        #endregion
    }

    public interface ILogger<T> : ILogger
    {

    }
}
